import request from '@/utils/request'

/**
 * 绘画提示词示例接口
 */
const drawsPromptExampleApi = {
    /**
     * 提示词示例列表
     */
    lists(params: {
        page_no?: number;
        page_size?: number;
        engine: string;
        title?: string;
        is_disable?: number;
        start_time?: string;
        end_time?: string;
    }): Promise<any> {
        return request.get({
            url: '/apply/draws/prompt_example/lists',
            params
        })
    },

    /**
     * 提示词示例新增
     */
    add(params: {
        engine: string;
        title: string;
        content: string;
        sort: number;
        is_disable: number;
    }): Promise<any> {
        return request.post({
            url: '/apply/draws/prompt_example/add',
            params
        })
    },

    /**
     * 提示词示例编辑
     */
    edit(params: {
        id: number;
        engine: string;
        title: string;
        content: string;
        sort: number;
        is_disable: number;
    }): Promise<any> {
        return request.post({
            url: '/apply/draws/prompt_example/edit',
            params
        })
    },

    /**
     * 提示词示例删除
     */
    delete(params: {
        engine: string;
        id: number;
    }): Promise<any> {
        return request.post({
            url: '/apply/draws/prompt_example/delete',
            params
        })
    }
}

export default drawsPromptExampleApi
